import { EntitySchema } from '@mikro-orm/core';

export class ImsYzdKpDiy {
  id!: number;
  pageData!: unknown;
  items!: unknown;
  type: number = 1;
  uniacid!: number;
  addTime!: string;
  updateTime!: string;
  ad?: unknown;
}

export const ImsYzdKpDiySchema = new EntitySchema({
  class: ImsYzdKpDiy,
  properties: {
    id: { primary: true, type: 'number' },
    pageData: { type: 'unknown', columnType: 'longtext' },
    items: { type: 'unknown', columnType: 'longtext' },
    type: { type: 'number', default: 1, index: 'type' },
    uniacid: { type: 'number', index: 'uniacid' },
    addTime: { type: 'string', length: 255 },
    updateTime: { type: 'string', length: 255 },
    ad: { type: 'unknown', columnType: 'longtext', nullable: true },
  },
});
